package com.atguigu.gulimall.order.feign;

import com.atguigu.common.constant.FeignConstant;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(FeignConstant.WARE_SERVICE)
public interface WareFeignService {
    @PostMapping(FeignConstant.CONTROLLER_WARE_WARESKU+FeignConstant.METHOD_WARE_WARESKU_HASSTOCK)
    R getSkusHasStock(@RequestBody List<Long> skuIds);

    @PostMapping(FeignConstant.CONTROLLER_WARE_WARESKU+FeignConstant.METHOD_WARE_WARESKU_LOCK_ORDER)
    R orderLockStock(@RequestBody WareSkuLockVo vo);
}
